package cn.wolfcode.productapi.feign.hystrix;

import cn.wolfcode.productapi.domain.Product;
import cn.wolfcode.productapi.feign.IProductFeignApi;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Component
@Slf4j
public class ProducHystrax implements IProductFeignApi {
    @Override
    public Product get(long id) {
        log.info("执行了商品降级方法");
        return new Product(-1L,"默认商品",new BigDecimal("0"),0);
    }
}
